package com.xhwl.logistics.service.feign;


import com.xhwl.common.dto.cent.vehicle.feign.VehicleAccessRecordRealtimeQuery;
import com.xhwl.common.dto.cent.vehicle.feign.VehicleCarTotalTwoAreaDTO;
import com.xhwl.common.dto.cent.vehicle.feign.VehicleVisitorCarDTO;
import com.xhwl.common.dto.cent.vehicle.feign.VehicleVisitorCarQuery;
import com.xhwl.common.dto.cent.visitor.VisitorInfoDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.query.cent.vehicle.VehcParkingLotQuery;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 提供车辆和出行记录的feign接口
 */
@RestController
public interface IVehicleCarAndAccessRecordFeignService {

    /**
     * 根据项目id和时间获取集成配置指定的区域信息的进记录减去出记录
     */
    @PostMapping("/vehicle-feign/get/two-area-car-info")
    VehicleCarTotalTwoAreaDTO getTwoAreaCarInfo(@RequestPart("vehicleAccessRecordRealtimeQuery") VehicleAccessRecordRealtimeQuery vehicleAccessRecordRealtimeQuery);

    /**
     * 获取最新的进记录和出记录Feign接口
     * @param visitorCarQuery 访客车业务查询类
     * @return List<VehicleAccessRecord> 访客车出入记录按照状态和车牌号进行查询
     */
    @PostMapping(value = "/vehicle-feign/access-record-by-status")
    List<VehicleVisitorCarDTO> accessRecordFeignList(@RequestPart("visitorCarQuery") VehicleVisitorCarQuery visitorCarQuery);

    /**
     * 蒙牛IOC车位总数统计
     */
    @PostMapping(value = "/vehicle-feign/mengniu/carport-number-by-type")
    Integer getCarportNumberByType(@RequestPart("projectId") Integer projectId, @RequestPart("type") Integer type);

    /**
     * 处理访客人脸信息
     * @return String 人脸图片base64
     */
    @PostMapping(value = "/vehicle-feign/face-url/upload")
    VisitorInfoDTO handleFaceUrl(@RequestPart("info") VisitorInfoDTO info);

    /**
     * 今日进园车辆数
     * @param query
     * @return
     */
    @PostMapping(value = "/vehicle-feign/access-record/in")
    ResultJson queryAccessRecordToday(@RequestPart("query") VehcParkingLotQuery query);
}
